import { Button, Card } from 'antd'
import { NavLink, useNavigate } from "react-router";
import PageHeaderWrapper from '@/components/pageHeaderWrapper'
import { useTabStore } from '@/store'
import './style.less'

function Role() {
  // console.log('Role')
  const navigate = useNavigate()
  const { addTab } = useTabStore()
  const onTest = ()=>{
    addTab({
      path: "/user",
      meta: { title: "用户管理"},
    })
  }
  return (
    <>
      <PageHeaderWrapper title="角色管理" subtitle="(副标题)" />
      <section className="G-main P-users">
        <Card>
          <div>Role页面</div>
          <NavLink to="/user">跳转1</NavLink>
          <NavLink to="/user?id=1">跳转2</NavLink>
          <Button type="primary" className="M-btn" onClick={()=> navigate('/user')}>跳转3</Button>
          <Button type="primary" className="M-btn" onClick={onTest}>测试</Button>
        </Card>
      </section>
    </>
  )
}

export default Role
